package com.spring.component.easyexcel;

public enum WeekEnum {
  /**
   *
   */
  WEEK_1(1, "星期一", "Mon."),
  WEEK_2(2, "星期二", "Tues."),
  WEEK_3(3, "星期三", "Wed."),
  WEEK_4(4, "星期四", "Thur."),
  WEEK_5(5, "星期五", "Fri."),
  WEEK_6(6, "星期六", "Sat."),
  WEEK_7(7, "星期日", "Sun.");

  /**
   * 序号
   */
  private int no;
  /**
   * 中文名称
   */
  private String cnStr;
  /**
   * 英文缩写
   */
  private String enStr;

  WeekEnum(int no, String chStr, String enStr) {
    this.no = no;
    this.cnStr = chStr;
    this.enStr = enStr;
  }

  public int getNo() {
    return no;
  }

  public void setNo(int no) {
    this.no = no;
  }

  public String getCnStr() {
    return cnStr;
  }

  public void setCnStr(String cnStr) {
    this.cnStr = cnStr;
  }

  public String getEnStr() {
    return enStr;
  }

  public void setEnStr(String enStr) {
    this.enStr = enStr;
  }

  public static WeekEnum week(String str) {
    WeekEnum[] wes = WeekEnum.values();
    for (WeekEnum we : wes) {
      if (we.cnStr.equals(str) || we.enStr.equals(str)) {
        return we;
      }
    }
    return null;
  }
}
